package com.loongtech.bi.entity.system;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

import com.loongtech.core.gen.GenInnerK;
import com.loongtech.core.jpa.entity.EntityIntAuto;

@Entity
@Table(name = "system_role_server", indexes = { @Index(name = "index_system_role_server_unique", unique = true, columnList = "roleId,serverId") })
@GenInnerK
public class EntitySysRoleServer extends EntityIntAuto {
	private static final long serialVersionUID = 1L;
	private int roleId;
	private String serverId;

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}	

	public String getServerId()
	{
		return serverId;
	}

	public void setServerId(String serverId)
	{
		this.serverId = serverId;
	}

	@Override
	public String toString() {
		return "EntitySysRoleServer [roleId=" + roleId + ", serverId=" + serverId + "]";
	}

	public static class K {
		public static final String roleId = "roleId";
		public static final String serverId = "serverId";
		public static final String id = "id";
		public static final String version = "version";
		
		//roleId, serverId, id, version, 
		public static java.util.List<String> toList() {
			java.util.List<String> list = new java.util.ArrayList<>();
			list.add(roleId);
			list.add(serverId);
			list.add(id);
			list.add(version);
			return list;
		}
	}
}